package com.xsr.controller;

import com.xsr.pojo.User;
import org.springframework.web.bind.annotation.*;

/**
 * @author 邢式瑞
 * @version 1.0
 * @project springMvcday03
 * @date 2022/9/13 15:21
 */
@RestController
@RequestMapping("/ajax")
public class AjaxServlet {
    @PostMapping
    public User save( @RequestBody User user){
        System.out.println(user);
        return user;
    }
    @PutMapping
    public  User update(@RequestBody User user){

        return user;
    }
    @GetMapping("/{id}")
    public  User Select(@PathVariable Integer id){
        User user = new User();
        return user;
    }
    @DeleteMapping("/{id}")
    public  User Delete(@PathVariable Integer id){
        User user = new User();
        return user;
    }
}
